﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media.Imaging;
using System.Diagnostics;

namespace Nox.Amuse.Helpers
{
    public static class ImageHelper
    {
        public static BitmapImage GetImageSourceFromResource(string filename)
        {
            var b = new BitmapImage();
            b.BeginInit();
            b.UriSource = new Uri(String.Format("pack://application:,,,/Images/{0}", filename));
            b.EndInit();
            return b;
        }
    }
}
